<!DOCTYPE html>
<html>
<head>
<title>database.md</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">

<style>
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

body {
	font-family: "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback";
	font-size: 14px;
	padding: 0 12px;
	line-height: 22px;
	word-wrap: break-word;
}

#code-csp-warning {
	position: fixed;
	top: 0;
	right: 0;
	color: white;
	margin: 16px;
	text-align: center;
	font-size: 12px;
	font-family: sans-serif;
	background-color:#444444;
	cursor: pointer;
	padding: 6px;
	box-shadow: 1px 1px 1px rgba(0,0,0,.25);
}

#code-csp-warning:hover {
	text-decoration: none;
	background-color:#007acc;
	box-shadow: 2px 2px 2px rgba(0,0,0,.25);
}


body.scrollBeyondLastLine {
	margin-bottom: calc(100vh - 22px);
}

body.showEditorSelection .code-line {
	position: relative;
}

body.showEditorSelection .code-active-line:before,
body.showEditorSelection .code-line:hover:before {
	content: "";
	display: block;
	position: absolute;
	top: 0;
	left: -12px;
	height: 100%;
}

body.showEditorSelection li.code-active-line:before,
body.showEditorSelection li.code-line:hover:before {
	left: -30px;
}

.vscode-light.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(0, 0, 0, 0.15);
}

.vscode-light.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(0, 0, 0, 0.40);
}

.vscode-dark.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(255, 255, 255, 0.4);
}

.vscode-dark.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(255, 255, 255, 0.60);
}

.vscode-high-contrast.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(255, 160, 0, 0.7);
}

.vscode-high-contrast.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(255, 160, 0, 1);
}

img {
	max-width: 100%;
	max-height: 100%;
}

a {
	color: #4080D0;
	text-decoration: none;
}

a:focus,
input:focus,
select:focus,
textarea:focus {
	outline: 1px solid -webkit-focus-ring-color;
	outline-offset: -1px;
}

hr {
	border: 0;
	height: 2px;
	border-bottom: 2px solid;
}

h1 {
	padding-bottom: 0.3em;
	line-height: 1.2;
	border-bottom-width: 1px;
	border-bottom-style: solid;
}

h1, h2, h3 {
	font-weight: normal;
}

h1 code,
h2 code,
h3 code,
h4 code,
h5 code,
h6 code {
	font-size: inherit;
	line-height: auto;
}

a:hover {
	color: #4080D0;
	text-decoration: underline;
}

table {
	border-collapse: collapse;
}

table > thead > tr > th {
	text-align: left;
	border-bottom: 1px solid;
}

table > thead > tr > th,
table > thead > tr > td,
table > tbody > tr > th,
table > tbody > tr > td {
	padding: 5px 10px;
}

table > tbody > tr + tr > td {
	border-top: 1px solid;
}

blockquote {
	margin: 0 7px 0 5px;
	padding: 0 16px 0 10px;
	border-left: 5px solid;
}

code {
	font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
	font-size: 14px;
	line-height: 19px;
}

body.wordWrap pre {
	white-space: pre-wrap;
}

.mac code {
	font-size: 12px;
	line-height: 18px;
}

pre:not(.hljs),
pre.hljs code > div {
	padding: 16px;
	border-radius: 3px;
	overflow: auto;
}

/** Theming */

.vscode-light,
.vscode-light pre code {
	color: rgb(30, 30, 30);
}

.vscode-dark,
.vscode-dark pre code {
	color: #DDD;
}

.vscode-high-contrast,
.vscode-high-contrast pre code {
	color: white;
}

.vscode-light code {
	color: #A31515;
}

.vscode-dark code {
	color: #D7BA7D;
}

.vscode-light pre:not(.hljs),
.vscode-light code > div {
	background-color: rgba(220, 220, 220, 0.4);
}

.vscode-dark pre:not(.hljs),
.vscode-dark code > div {
	background-color: rgba(10, 10, 10, 0.4);
}

.vscode-high-contrast pre:not(.hljs),
.vscode-high-contrast code > div {
	background-color: rgb(0, 0, 0);
}

.vscode-high-contrast h1 {
	border-color: rgb(0, 0, 0);
}

.vscode-light table > thead > tr > th {
	border-color: rgba(0, 0, 0, 0.69);
}

.vscode-dark table > thead > tr > th {
	border-color: rgba(255, 255, 255, 0.69);
}

.vscode-light h1,
.vscode-light hr,
.vscode-light table > tbody > tr + tr > td {
	border-color: rgba(0, 0, 0, 0.18);
}

.vscode-dark h1,
.vscode-dark hr,
.vscode-dark table > tbody > tr + tr > td {
	border-color: rgba(255, 255, 255, 0.18);
}

.vscode-light blockquote,
.vscode-dark blockquote {
	background: rgba(127, 127, 127, 0.1);
	border-color: rgba(0, 122, 204, 0.5);
}

.vscode-high-contrast blockquote {
	background: transparent;
	border-color: #fff;
}
</style>

<style>
/* Tomorrow Theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */

/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
	color: #8e908c;
}

/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
	color: #c82829;
}

/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
	color: #f5871f;
}

/* Tomorrow Yellow */
.hljs-attribute {
	color: #eab700;
}

/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
	color: #718c00;
}

/* Tomorrow Blue */
.hljs-title,
.hljs-section {
	color: #4271ae;
}

/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
	color: #8959a8;
}

.hljs {
	display: block;
	overflow-x: auto;
	color: #4d4d4c;
	padding: 0.5em;
}

.hljs-emphasis {
	font-style: italic;
}

.hljs-strong {
	font-weight: bold;
}
</style>

<style>
/*
 * Markdown PDF CSS
 */

 body {
	font-family:  "Meiryo", "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback";
}

pre {
	background-color: #f8f8f8;
	border: 1px solid #cccccc;
	border-radius: 3px;
	overflow-x: auto;
	white-space: pre-wrap;
	overflow-wrap: break-word;
}

pre:not(.hljs) {
	padding: 23px;
	line-height: 19px;
}

blockquote {
	background: rgba(127, 127, 127, 0.1);
	border-color: rgba(0, 122, 204, 0.5);
}

.emoji {
	height: 1.4em;
}

/* for inline code */
:not(pre):not(.hljs) > code {
	color: #C9AE75; /* Change the old color so it seems less like an error */
	font-size: inherit;
}

/* Page Break : use <div class="page"/> to insert page break
-------------------------------------------------------- */
.page {
	page-break-after: always;
}

</style>

</head>
<body>
<h1 id="%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1">数据库设计</h1>
<blockquote>
<p>v1.0.0.20190622</p>
</blockquote>
<hr>
<h4 id="%E5%9B%BE%E4%B9%A6%E9%A6%86-library">图书馆 <code>library</code></h4>
<p>智慧云图书馆</p>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>mobile</td>
<td>string</td>
<td>32</td>
<td>是</td>
<td>-</td>
<td>电话</td>
</tr>
<tr>
<td>address</td>
<td>string</td>
<td>128</td>
<td>是</td>
<td>-</td>
<td>地址</td>
</tr>
<tr>
<td>pid</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>父ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E5%9B%BE%E4%B9%A6%E9%A6%86%E7%AE%A1%E7%90%86%E5%91%98-user">图书馆管理员 <code>user</code></h4>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>user_name</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>mobile</td>
<td>string</td>
<td>32</td>
<td>是</td>
<td>-</td>
<td>电话</td>
</tr>
<tr>
<td>auth_key</td>
<td>string</td>
<td>32</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>access_token</td>
<td>string</td>
<td>32</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>password_hash</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>oauth_client</td>
<td>string</td>
<td>64</td>
<td>是</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>oauth_client_user_id</td>
<td>string</td>
<td>64</td>
<td>是</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>email</td>
<td>string</td>
<td>64</td>
<td>是</td>
<td>-</td>
<td>邮箱</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E8%AF%BB%E8%80%85-reader">读者 <code>reader</code></h4>
<blockquote>
<p>记录读者信息</p>
</blockquote>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>card_number</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>卡号</td>
</tr>
<tr>
<td>card_status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>证件状态（默认正常0，挂失1）</td>
</tr>
<tr>
<td>reader_name</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>姓名</td>
</tr>
<tr>
<td>validity</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>有效期限</td>
</tr>
<tr>
<td>id_card</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>身份证</td>
</tr>
<tr>
<td>reader_type_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>读者类型</td>
</tr>
<tr>
<td>gender</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>性别</td>
</tr>
<tr>
<td>deposit</td>
<td>decimal</td>
<td>2</td>
<td>否</td>
<td>-</td>
<td>押金(元)</td>
</tr>
<tr>
<td>creditmoney</td>
<td>decimal</td>
<td>2</td>
<td>否</td>
<td>-</td>
<td>欠费金额(元)</td>
</tr>
<tr>
<td>mobile</td>
<td>string</td>
<td>32</td>
<td>是</td>
<td>-</td>
<td>电话</td>
</tr>
<tr>
<td>address</td>
<td>string</td>
<td>128</td>
<td>是</td>
<td>-</td>
<td>地址</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E5%80%9F%E8%BF%98%E4%B9%A6%E8%A1%A8-borrowreturnbooks">借还书表 <code>borrow_return_books</code></h4>
<blockquote>
<p>记录借还书信息</p>
</blockquote>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>reader_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>读者ID</td>
</tr>
<tr>
<td>card_number</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>卡号</td>
</tr>
<tr>
<td>reader_name</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>姓名</td>
</tr>
<tr>
<td>bar_code</td>
<td>strind</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>条码号</td>
</tr>
<tr>
<td>operation</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>借还书操作0还1借</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E7%BC%B4%E7%BA%B3%E6%AC%A0%E8%B4%B9-paymentofdebt">缴纳欠费 <code>payment_of_debt</code></h4>
<blockquote>
<p>记录读者缴纳欠费信息</p>
</blockquote>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>card_number</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>卡号</td>
</tr>
<tr>
<td>reader_name</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>姓名</td>
</tr>
<tr>
<td>violation_type_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>违章类型</td>
</tr>
<tr>
<td>payment_status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>缴费状态（未缴0， 默认已缴1）</td>
</tr>
<tr>
<td>penalty</td>
<td>decimal</td>
<td>2</td>
<td>否</td>
<td>-</td>
<td>罚金(元)</td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td>256</td>
<td>是</td>
<td>-</td>
<td>描述</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E5%9B%BE%E4%B9%A6-book">图书  <code>book</code></h4>
<blockquote>
<p>图书馆典藏图书信息</p>
</blockquote>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>题名</td>
</tr>
<tr>
<td>isbn</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>ISBN</td>
</tr>
<tr>
<td>cover_img</td>
<td>string</td>
<td>256</td>
<td>-</td>
<td>-</td>
<td>封面</td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td>1024</td>
<td>-</td>
<td>-</td>
<td>简介</td>
</tr>
<tr>
<td>author</td>
<td>string</td>
<td>64</td>
<td>否</td>
<td>-</td>
<td>作者</td>
</tr>
<tr>
<td>price</td>
<td>decimal</td>
<td>2</td>
<td>-</td>
<td>-</td>
<td>价格(元)</td>
</tr>
<tr>
<td>class_number</td>
<td>string</td>
<td>64</td>
<td>-</td>
<td>-</td>
<td>分类号</td>
</tr>
<tr>
<td>call_number</td>
<td>string</td>
<td>64</td>
<td>-</td>
<td>-</td>
<td>索书号</td>
</tr>
<tr>
<td>book_copy_number</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>复本数</td>
</tr>
<tr>
<td>publisher</td>
<td>string</td>
<td>64</td>
<td>-</td>
<td>-</td>
<td>出版社</td>
</tr>
<tr>
<td>publication_place</td>
<td>string</td>
<td>64</td>
<td>-</td>
<td>-</td>
<td>出版地</td>
</tr>
<tr>
<td>publish_date</td>
<td>string</td>
<td>64</td>
<td>-</td>
<td>-</td>
<td>出版年月</td>
</tr>
<tr>
<td>series_title</td>
<td>string</td>
<td>64</td>
<td>-</td>
<td>-</td>
<td>从书名</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<h4 id="%E5%9B%BE%E4%B9%A6%E5%89%AF%E6%9C%AC-bookcopy">图书副本 <code>book_copy</code></h4>
<blockquote>
<p>图书副本信息</p>
</blockquote>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>题名</td>
</tr>
<tr>
<td>bar_code</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>条码号(bar_code表中来)</td>
</tr>
<tr>
<td>bookseller_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>书商</td>
</tr>
<tr>
<td>price1</td>
<td>decimal</td>
<td>2</td>
<td>否</td>
<td>-</td>
<td>实洋(元)</td>
</tr>
<tr>
<td>price2</td>
<td>decimal</td>
<td>2</td>
<td>否</td>
<td>-</td>
<td>码洋(元)</td>
</tr>
<tr>
<td>collection_place_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>馆藏地</td>
</tr>
<tr>
<td>circulation_type_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>流通类型</td>
</tr>
<tr>
<td>call_number_rules_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>索书号(call_number_rules表 主键ID?)</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E9%A6%86%E8%97%8F%E5%9C%B0%E7%82%B9-collectionplace">馆藏地点 <code>collection_place</code></h4>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td>256</td>
<td>是</td>
<td>-</td>
<td>说明</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E4%B9%A6%E5%95%86-bookseller">书商 <code>bookseller</code></h4>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>address</td>
<td>string</td>
<td>128</td>
<td>-</td>
<td>-</td>
<td>地址</td>
</tr>
<tr>
<td>contact</td>
<td>string</td>
<td>128</td>
<td>-</td>
<td>-</td>
<td>联系人姓名</td>
</tr>
<tr>
<td>mobile</td>
<td>string</td>
<td>32</td>
<td>-</td>
<td>-</td>
<td>电话</td>
</tr>
<tr>
<td>discount</td>
<td>decimal</td>
<td>2</td>
<td>-</td>
<td>-</td>
<td>折扣，如0.85</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>-</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E9%98%85%E8%A7%88%E5%AE%A4-readingroom">阅览室 <code>reading_room</code></h4>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td>256</td>
<td>是</td>
<td>-</td>
<td>说明</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E8%BF%9D%E7%AB%A0%E7%B1%BB%E5%9E%8B-violationtype">违章类型 <code>violation_type</code></h4>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td>256</td>
<td>是</td>
<td>-</td>
<td>说明</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E6%B5%81%E9%80%9A%E7%B1%BB%E5%9E%8B-circulationtype">流通类型 <code>circulation_type</code></h4>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td>256</td>
<td>是</td>
<td>-</td>
<td>说明</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E8%AF%BB%E8%80%85%E7%B1%BB%E5%9E%8B-readertype">读者类型 <code>reader_type</code></h4>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>max_borrowing_number</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>最大借阅量（本）</td>
</tr>
<tr>
<td>max_debt_limit</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>最大欠费额度（元）</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E5%80%9F%E9%98%85%E8%A7%84%E5%88%99-borrowingrules">借阅规则 <code>borrowing_rules</code></h4>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>general_loan_period</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>一般借期(天)</td>
</tr>
<tr>
<td>extended_period_impunity</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>超期免罚期限(天)</td>
</tr>
<tr>
<td>first_term_of_punishment</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>首罚期限(天)</td>
</tr>
<tr>
<td>first_penalty_unit_price</td>
<td>decimal</td>
<td>2</td>
<td>否</td>
<td>-</td>
<td>首罚单价(元)</td>
</tr>
<tr>
<td>other__unit_price</td>
<td>decimal</td>
<td>2</td>
<td>否</td>
<td>-</td>
<td>其它单价(元)</td>
</tr>
<tr>
<td>reader_type_ids</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>适用读者类型(json,reader_type-&gt;id)</td>
</tr>
<tr>
<td>circulation_type_ids</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>适用流通类型(json,circulation_type-&gt;id)</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E6%9D%A1%E7%A0%81%E5%8F%B7-barcode">条码号 <code>bar_code</code></h4>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>名称</td>
</tr>
<tr>
<td>prefix</td>
<td>string</td>
<td>64</td>
<td>-</td>
<td>-</td>
<td>前缀</td>
</tr>
<tr>
<td>number_length</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>数字长度</td>
</tr>
<tr>
<td>min_number</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>数字最小值</td>
</tr>
<tr>
<td>max_number</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>数字最大值</td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td>256</td>
<td>-</td>
<td>-</td>
<td>说明</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h4 id="%E7%B4%A2%E4%B9%A6%E5%8F%B7%E8%A7%84%E5%88%99-callnumberrules">索书号规则 <code>call_number_rules</code></h4>
<blockquote>
<p>collection_place_ids 为 collection_place表主键ID , 存json格式
circulation_type_ids 为 circulation_type表主键ID, 存json格式</p>
</blockquote>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>128</td>
<td>否</td>
<td>-</td>
<td>规则名称</td>
</tr>
<tr>
<td>collection_place_ids</td>
<td>string</td>
<td>512</td>
<td>否</td>
<td>-</td>
<td>馆藏地(,分割collection_place id)</td>
</tr>
<tr>
<td>circulation_type_ids</td>
<td>string</td>
<td>512</td>
<td>否</td>
<td>-</td>
<td>流通类型(,分割circulation_type id)</td>
</tr>
<tr>
<td>library_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>图书馆ID</td>
</tr>
<tr>
<td>user_id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>操作员ID</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>创建时间</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>更新时间</td>
</tr>
<tr>
<td>status</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>-</td>
<td>状态, 默认值1</td>
</tr>
</tbody>
</table>
<hr>
<h3 id="%E7%BB%9F%E8%AE%A1%E4%BF%A1%E6%81%AF">统计信息</h3>
<blockquote>
<p>以下表记录统计信息，可后续进一步完善。</p>
</blockquote>
<hr>
<h3 id="%E5%80%9F%E9%98%85%E6%8E%92%E8%A1%8C%E6%A6%9C">借阅排行榜</h3>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
</tbody>
</table>
<hr>
<h3 id="%E9%A6%86%E8%97%8F%E7%BB%9F%E8%AE%A1">馆藏统计</h3>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
</tbody>
</table>
<hr>
<h3 id="%E6%B5%81%E9%80%9A%E7%BB%9F%E8%AE%A1">流通统计</h3>
<table>
<thead>
<tr>
<th>字段名</th>
<th>数据类型</th>
<th>长度</th>
<th>可空</th>
<th>主键</th>
<th>注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>11</td>
<td>否</td>
<td>是</td>
<td>主键ID</td>
</tr>
</tbody>
</table>

</body>
</html>
